package com.friend.entity.entity.base;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author friend
 * @since 2019-12-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@RequiredArgsConstructor(staticName = "of")
@TableName("t_friend_note")
@ApiModel(value="FriendNote对象", description="")
public class FriendNote extends Model<FriendNote> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "道友记主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "发布内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "发布时间")
    @TableField("pub_time")
    private LocalDateTime pubTime;

    @ApiModelProperty(value = "发布时间字符串")
    @TableField(exist = false)
    private String pubTimeStr;

    @ApiModelProperty(value = "发布地址")
    @TableField("pub_address")
    private String pubAddress;

    @ApiModelProperty(value = "点赞数")
    @TableField("assist")
    private Integer assist;

    @ApiModelProperty(value = "发布人")
    @TableField("publ_user")
    private Integer publUser;

    @ApiModelProperty(value = "发布人昵称")
    @TableField(exist = false)
    private String nickname;

    @ApiModelProperty(value = "发布人头像")
    @TableField(exist = false)
    private String faceImage;

    @ApiModelProperty(value = "发布人性别")
    @TableField(exist = false)
    private Integer sex;

    @ApiModelProperty(value = "自己是否点赞0否1是")
    @TableField(exist = false)
    private Integer ifAssist;

    @ApiModelProperty(value = "删除标识")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
